package com.cdxy.enums.redis;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: tangy
 * @Date: 2020/2/23 14:30
 */
@Getter
@AllArgsConstructor
public enum RedisCacheGroupEnum implements IRedisCacheGroup {
    /**
     * 缓存 redis 的场景
     */
    LOGIN_MOBILE_CODE("LOGIN_MOBILE", "手机号登录验证码"),
    LOGIN_EMAIL_CODE("LOGIN_EMAIL_CODE", "邮箱登录验证码"),
    LOGIN_ACCOUNT("LOGIN_ACCOUNT", "账号登录"),
    LOGIN_IMG_CODE("LOGIN_IMG_CODE", "图片验证码"),

    // 登陆成功后保存 token
    LOGIN_SUCCESS_TOKEN("LOGIN_SUCCESS_TOKEN", "登陆成功后保存 token"),
    ;

    private String code;
    private String desc;

    @Override
    public String getGroup() {
        return this.code;
    }
}
